Imports
[1]:
# print 10 random numbers between 1 and 100
import random
for i in range(10):
print(random.randint(1, 100))
25
94
53
31
75
57
18
3
72
31
[2]:
# print current directory
import os
print(os.getcwd())
/home/zahra/Desktop/GitHub/WavePropError/docs/source/modules
[3]:
import plotly.graph_objs as go
import numpy as np
# Create data
x = np.linspace(0, 10, 100)
y = np.sin(x)
# Create plot
fig = go.Figure()
fig.add_trace(go.Scatter(x=x, y=y, mode='lines', name='sin(x)'))
fig.update_layout(title='Interactive Plotly Sine Wave', xaxis_title='x', yaxis_title='sin(x)')
# Show plot
fig.show()